package htmlReader;

import java.io.IOException;

import util.DownTVException;

public class HtmlReadControler {

	private PrepareReading prepareReading = null;
	
	private ReadBatchHtml readBatchHtml = null;
	
	public void work() throws IOException, DownTVException {
		prepareReading = new PrepareReading();
		prepareReading.makePreparations();
		readBatchHtml = new ReadBatchHtml(prepareReading.getChannelDirNm());
		readBatchHtml.batchReadHtml(prepareReading.getHtmlMap());		
	}
	
	public String getChannelDirNm(){		
		return prepareReading.getChannelDirNm();
	}

	/**
	 * @param args
	 */
	public static void main(String[] args) {		
		try {
			HtmlReadControler htmlReadCtrl = new HtmlReadControler();
			htmlReadCtrl.work();
		} catch (IOException e) {
			e.printStackTrace();
		} catch (DownTVException e) {
			e.printStackTrace();
		}
	}
}
